Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 4 - Printing Messages / Printing Messages Reference
Printing Messages / Device Communications Messages


GXCleanupOpenConnection

QuickDraw GX sends the GXCleanupOpenConnection message when an operation that has to be undone fails during the processing of an GXOpenConnection message. You need to override the GXCleanupOpenConnection message if you perform operations that must be undone after a failure in GXOpenConnection. Your override of the GXCleanupOpenConnection message must match the following formal declaration:

void MyCleanupOpenConnection (void);
DESCRIPTION
When an operation fails in your override of the GXOpenConnection message, you need to call the GXCleanupOpenConnection function.

When you call the GXCleanupOpenConnection function, QuickDraw GX sends the GXCleanupOpenConnection message to any message handlers that follow your printing extension or printer driver in the message chain. Each message handler is responsible for cleaning up any operations that it performed in its GXOpenConnection override. Usually this involves deallocating any storage that you allocated in your override of the GXOpenConnection message to open the connection.

The GXCleanupOpenConnection message follows the same path through the message chain as did the original GXOpenConnection message, which allows the cleaning up to occur in the correct order.

The default implementation of the GXCleanupOpenConnection message disposes of memory allocated by the default implementation of the GXOpenConnection message.

SPECIAL CONSIDERATIONS
You never send the GXCleanupOpenConnection message yourself; however, you can call the GXCleanupOpenConnection function, which then sends this message.

You need to forward the GXCleanupOpenConnection message so that other message handlers can perform their cleanup tasks.

SEE ALSO
The GXCleanupOpenConnection function is described on page 5-36 in the chapter "Printing Functions for Message Overrides" in this book.

The GXOpenConnection message is described in the previous section.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help